<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="dto.URLDTO"%>
<%@ page import= "java.util.Iterator"%>
<%@ page import= "java.util.List"%>

<html>
<head>
	<title>Lista de Urls</title>
</head>
<body>

<table cellspacing="3" cellpadding="3" border="1" width="500">
	<tr>
		<td colspan="4"><b>Lista de Urls</b></td>
	</tr>
	<tr>
		<td><b>Id</b></td>
		<td><b>Url</b></td>
		<td><b>Deposito</b></td>
		<td><b>Borrar</b></td>
		
		
		
	</tr>
<%
	URLDTO aux;
	Integer id; 	
	List<URLDTO>  usuarios = (List<URLDTO>)request.getAttribute("usuarios");
	for(Iterator<URLDTO> i = usuarios.iterator(); i.hasNext();)
	{
		aux = i.next();
		id = aux.getId();
%>
	<tr>
	
		<td><%=aux.getId()%></td>	
 		<td><%=aux.getUrl()%></td>
		<td><%=aux.getDeposito()%></td>
		<td><a href="ControladorUrl?action=borrar&id=<%=id%>">BORRAR</a></td>
	
		
		
	</tr>
<% } %>
	<tr>
		<td colspan="5">
		 <a href="ControladorUrl?action=new">Registrar Url</a>
		</td>
	</tr>
</table>
</body>
</html>